//
//  LXCarDetailTableViewCell.m
//  ZuLinProject
//
//  Created by bancheng on 2022/9/22.
//  Copyright © 2022 LX_App. All rights reserved.
//

#import "LXCarDetailTableViewCell.h"

@implementation LXCarDetailTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setModel:(CheLiangModel *)model{
    _model = model;
    
    
    
    self.label1.text = [NSString stringWithFormat:@"押金金额   %@",[NSString toTen:model.depositPrice]];
    [self.label1 addAttributes:TextAttrCorlor(ColorWithFF921C) forString:[NSString toTen:model.depositPrice]];
    
    
    self.label2.text = [NSString stringWithFormat:@"出险状态   %@",model.useInsurance?@"有":@"无"];
    if (model.useInsurance) {
        [self.label2 addAttributes:TextAttrCorlor(ColorWithFF921C) forString:@"有"];
    }
    else {
        [self.label2 addAttributes:TextAttrCorlor(ColorWith3C6CFC) forString:@"无"];
    }
    
    self.label3.text = [NSString stringWithFormat:@"违章状态   %@",model.illegalState?@"有":@"无"];
    if (model.illegalState) {
        [self.label3 addAttributes:TextAttrCorlor(ColorWithFF921C) forString:@"有"];
    }
    else {
        [self.label3 addAttributes:TextAttrCorlor(ColorWith3C6CFC) forString:@"无"];
    }

    
    self.label4.text = [NSString stringWithFormat:@"交租状态   %@",model.rentPaymentState?@"已交清":@"未交清"];
    if (model.rentPaymentState) {
        [self.label4 addAttributes:TextAttrCorlor(ColorWithFF921C) forString:@"未交清"];
    }
    else {
        [self.label4 addAttributes:TextAttrCorlor(ColorWith3C6CFC) forString:@"已交清"];
    }
    

    self.label5.text = [NSString stringWithFormat:@"维修状态   %@",model.repairState?@"有":@"无"];
    if (model.rentPaymentState) {
        [self.label5 addAttributes:TextAttrCorlor(ColorWithFF921C) forString:@"有"];
    }
    else {
        [self.label5 addAttributes:TextAttrCorlor(ColorWith3C6CFC) forString:@"无"];
    }
    
    
    self.label6.text = [NSString stringWithFormat:@"原始里程   %@km",model.oldMileage];
    [self.label6 addAttributes:TextAttrCorlor(ColorWithFF921C) forString:[NSString stringWithFormat:@"%@km",model.oldMileage]];

    
}
@end
